import request from '@/utils/request'

// 查询设备系列列表
export function listSeries(query) {
  return request({
    url: '/device/series/list',
    method: 'get',
    params: query
  })
}

// 查询设备系列详细
export function getSeries(id) {
  return request({
    url: '/device/series/' + id,
    method: 'get'
  })
}

// 新增设备系列
export function addSeries(data) {
  return request({
    url: '/device/series',
    method: 'post',
    data: data
  })
}

// 修改设备系列
export function updateSeries(data) {
  return request({
    url: '/device/series',
    method: 'put',
    data: data
  })
}

// 删除设备系列
export function delSeries(id) {
  return request({
    url: '/device/series/' + id,
    method: 'delete'
  })
}

// 查询系列下拉列表
export function optionSeries() {
  return request({
    url: '/device/series/optionSeries',
    method: 'get'
  })
}

// 订阅
export function subscript(id) {
  return request({
    url: '/device/series/subscript/'+id,
    method: 'get'
  })
}

// 取消订阅
export function unSubscript(id) {
  return request({
    url: '/device/series/unSubscript/'+id,
    method: 'get'
  })
}

// 创建超级表
export function createSTable(id) {
  return request({
    url: '/device/series/createSTable/'+id,
    method: 'get'
  })
}